import axiosServer from '../utils/request.js'

export const requestProductList=(pageNo:number,pageSize:number) =>{
    return axiosServer({
        method:'get',
        url:'api/shop/list',
        params:{
            pageNo,
            pageSize,
        }
    })
}
// 商品分类
export const RequestCategoryList = () => {
    return axiosServer({
      method: "get",
      url: "/api/shop/category/list",
    });
  };
  
  // 查找分类商品
  export const RequestShopListByCategoryId = (categoryId: number) => {
    return axiosServer({
      method: "get",
      url: "/api/shop/list/category",
      params: {
        categoryId,
      },
    });
  };
  
  /**
   * 商品详情
   */
  export const RequestProductDetailById = (id: number) => {
    return axiosServer({
      method: "get",
      url: "/api/shop/find",
      params: {
        id,
      },
    });
  };